<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%
    /**
     * @author 谭湘元
     * @since 2009/04/23
     */
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>聋校备课与语言学习及矫治系统</title>
<fmt:setBundle basename="PathResource" scope="session" />
<link href="<%=request.getContextPath() %>/<fmt:message key='StylePath' />style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function modifyGame(id){
		document.forms[0].action = "game.do?method=toModifyGame&gameId="+id;
		document.forms[0].submit();
	}
	function deleteGame(id){
		if(confirm("确定要删除？")){
			document.forms[0].action = "game.do?method=queryGames&operatorSign=delete&gameId="+id;
			document.forms[0].submit();
		}
	}
</script>
</head>

<body class="bcolor">
<form id="form1" name="form1" method="post" action="game.do?method=queryGames">
  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#a7c8e6">
    <tr>
      <td><table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" class="fontbot">
          <tr>
            <td width="15%" align="right" valign="middle" bgcolor="#FFFFFF">游戏名称：</td>
            <td width="10%" valign="middle" bgcolor="#FFFFFF"><input name="gameName" type="text" class="boxcopy2" value="<c:out value="${param.gameName }"/>" id="textfield10" style="width:200px;" /></td>
            <td width="15%" align="right" valign="middle" bgcolor="#FFFFFF">游戏类别：</td>
            <td width="10%" valign="middle" bgcolor="#FFFFFF">
            <select name="gameType" class="boxcopy2" id="select3" style="width:210px;">
					<option value="">所有</option>
					<c:forEach items="${gameTypes}" var="gameType">
						<option value="<c:out value="${gameType.id }" />" <c:if test="${param.gameType==gameType.id }">selected</c:if> ><c:out value="${gameType.name}"/></option>	
					</c:forEach>
	            </select>
            </td>
            
            <td valign="middle" bgcolor="#FFFFFF"><a href="#" onfocus="this.blur()" onclick="document.forms[0].submit();"><img src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />/gif-03.gif" border="0" /></a></td>
          </tr>
      </table></td>
    </tr>
  </table>
  <table cellspacing="0" cellpadding="0" width="99%" align="center" border="0">
    <tbody>
      <tr>
        <td width="7"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_01.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_05.gif"><table cellspacing="0" cellpadding="0" width="100%" border="0">
            <tbody>
              <tr>
                <td width="30"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_02.gif" width="30" /></td>
                <td align="left" width="200"  background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_03.gif">&nbsp;<strong> 游 戏 维 护</strong></td>
                <td width="59"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_04.gif" width="59" /></td>
                <td>&nbsp;</td>
              </tr>
            </tbody>
        </table></td>
        <td width="8"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_06.gif" width="8" /></td>
      </tr>
      <tr>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_07.gif"><img height="1" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
        <td bgcolor="#f7fbff"><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" bordercolorlight="#ffffff">
        <tr bgcolor="#CCDDF2">
          <td width="20" valign="middle">&nbsp;</td>
          <td height="20" align="center"><strong>游戏名称</strong></td>
          <td height="20" align="center"><strong>游戏类别</strong></td>
          <td height="20" align="center"><strong>添加日期</strong></td>
          <td height="20" align="center"><strong>编 辑</strong></td>
          <td align="center"><strong>删 除</strong></td>
          </tr>
          <c:forEach items="${pagenitionModel.resultItems}" var="item" varStatus="status">
        <tr>
          <td height="20" align="center" bgcolor="#FFFFFF"><c:out value="${status.count}" />.</td>
          <td height="20" align="center" bgcolor="#FFFFFF"><c:out value="${item.name}" /></td>
          <td height="20" align="center" bgcolor="#FFFFFF">
            <c:forEach items="${gameTypes}" var="gameType">
					<c:if test="${item.gameType.id==gameType.id }"><c:out value="${item.gameType.name}"/></c:if>
			</c:forEach>
          </td>
          <td height="20" align="center" bgcolor="#FFFFFF"><fmt:formatDate value="${item.createDate}" pattern="yyyy-MM-dd HH:mm"/></td>
          <td height="20" align="center" bgcolor="#FFFFFF"><a href="#" onfocus="this.blur()" onclick="modifyGame('<c:out value="${item.id}"/>');">
			<img src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />bianji.gif" width="16" height="16" border="0" /></a></td>
          <td align="center" bgcolor="#FFFFFF"><a href="#" onfocus="this.blur()" onclick="deleteGame('<c:out value="${item.id}"/>');">
			<img src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />de.gif" width="16" height="16" border="0" /></a></td>
        </tr>
          
        </c:forEach>
      </table>
        <jsp:include page="../../common/pagination.jsp"></jsp:include>
      </td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_09.gif"><img height="1" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
      </tr>
      <tr>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_10.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_11.gif">&nbsp;</td>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_12.gif" width="8" /></td>
      </tr>
    </tbody>
  </table>
</form>
</body>
</html>
